package org.song.exception.result;

public enum ResultEnum implements ResultInterface{
    SUCCESS(0,"操作成功"),
    FAILED(1,"操作失败"),
    INSUFFICIENT_IDENTITY(-1,"身份不足"),
    NO_PERMISSION(-2,"权限不足"),
    Exception(-3,"服务器错误请稍后再试")
    ;

    private Integer code;
    private String msg;

    private ResultEnum() {}

    private ResultEnum(Integer code,String msg) {
        this.code = code;
        this.msg = msg;
    }

    @Override
    public Integer getCode() {
        return this.code;
    }

    @Override
    public String getMsg() {
        return this.msg;
    }
}
